		TITLE	GETNAME - Copyright (c) SLR Systems 1994

		INCLUDE MACROS

		PUBLIC	GET_OMF_NAME_LENGTH_ROUTINE,GET_OMF_NAME_LENGTH_EDI,TOO_LONG


		.DATA


		.CODE	PASS1_TEXT

		EXTERNDEF	ERR_ABORT:PROC

		EXTERNDEF	TOO_LONG_ERR:ABS


GET_OMF_NAME_LENGTH_ROUTINE	PROC
		;
		;
		;
		XOR	EAX,EAX

		MOV	AL,[ESI]
		INC	ESI

		CMP	AL,-1
		JZ	L1$
L2$:
		RET

L1$:
		CMP	BPTR [ESI],AH
		JNZ	L2$

		MOV	AX,[ESI+1]
		ADD	ESI,3

		CMP	EAX,SYMBOL_TEXT_SIZE
		JA	TOO_LONG

		RET

TOO_LONG::
		MOV	AL,TOO_LONG_ERR
		CALL	ERR_ABORT


GET_OMF_NAME_LENGTH_ROUTINE	ENDP


GET_OMF_NAME_LENGTH_EDI	PROC
		;
		;
		;
		XOR	EAX,EAX

		MOV	AL,[EDI]
		INC	EDI

		CMP	AL,-1
		JZ	L1$
L2$:
		RET

L1$:
		CMP	BPTR [EDI],AH
		JNZ	L2$

		MOV	AX,[EDI+1]
		ADD	EDI,3

		CMP	EAX,SYMBOL_TEXT_SIZE
		JA	TOO_LONG

		RET

GET_OMF_NAME_LENGTH_EDI	ENDP


		END

